#{set title:'Extranet' /} 
#{extends 'main.html' /}

#{if flash.success}
<div class="alert alert-success" align=center>
<a class=close data-dismiss="alert">x</a>
   <b> <p class="success">${flash.success}</p> </b>
</div> 
#{/if}
#{if flash.error}
<div class="alert alert-error" align=center>
<a class=close data-dismiss="alert">x</a>
   <b> <p class="success">${flash.error}</p> </b>
</div> 
#{/if}
<script type="text/javascript">
function SomenteNumero(e){
    var tecla=(window.event)?event.keyCode:e.which;   
    if((tecla>47 && tecla<58)) return true;
    else{
    	if (tecla==8 || tecla==0) return true;
	else  return false;
    }
}
</script>

<!-- barra superior. codigo para mostrar o nome do usuario logado -->
<div class="navbar navbar-fixed-top">
	<div class="navbar-inner">
		<div class="container">
			<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"> <span
				class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span>
			</a> <a class="brand" align="center"> &nbsp; EXTRANET - Sistema de Controle de Tarefas</a>
			<div>
				<ul class="nav pull-right">

					<li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown"> Ola,
							<b>${user}</b> <b class="caret"></b>
					</a>
						<ul class="dropdown-menu">
							<li><a href="@{Application.logout()}"> <i class="icon-off"></i> Sair</a></li>
						</ul></li>
				</ul>
			</div>
		</div>
	</div>
</div>
<div align="center">
<br><br><br>
<label><h3>Tarefa: ${tarefa.tituloTarefa}</h3></label>
</div>
<table>
#{form @LogsTarefa.adicionarLogTarefa()}
	<tr>
		<td>Tempo Gasto:</td>
			<td><input type="text" style="width:22px" maxlength="2" name="horas" value="${params.horas}" onkeypress='return SomenteNumero(event)' required  />:
			<input type="text" style="width:22px" maxlength="2" name="minutos" value="${params.minutos}" onkeypress='return SomenteNumero(event)' required />hs
		</td>
	</tr>
	<tr>
		<td>Porcentagem Conclus&atilde;o:</td>
		<td>
		<select name="porcentagem">
			<option value="0">0</option>
			<option value="10">10</option>
			<option value="20">20</option>
			<option value="30">30</option>
			<option value="40">40</option>
			<option value="50">50</option>
			<option value="60">60</option>
			<option value="70">70</option>
			<option value="80">80</option>
			<option value="90">90</option>
			<option value="100">100</option>
		</select>
	</td>	
	</tr>
	<tr>
		<td>Descri&ccedil;&atilde;o:</td>
		<td><textarea rows="4" cols="50" name="descricao" value="${params.descricao}"> </textarea></td>
	</tr>
	
	<tr>
		<td><input type="hidden" name="id" value="${id}"/><input type="submit" value="Registrar Log" /></td>
		#{/form}
	</tr>
</table>